package com.woniuxy.dao;

import com.woniuxy.dao.model.Account;
import com.woniuxy.dao.model.UserProject;
import com.woniuxy.dao.model.UserProjectArea;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 项目人员-区域关系表  项目人员表附表  Mapper 接口
 * </p>
 *
 * @author Keep it simple
 * @since 2022-06-28
 */
public interface UserProjectAreaDao extends BaseMapper<UserProjectArea> {

    @Select("SELECT * FROM account JOIN user_project_area ON " +
            "account.id=user_project_area.zId " +
            "WHERE user_project_area.areaCode=#{id}")
    List<Account> getRepairerByAreaId(@Param("id") Integer id);
}
